﻿@{
    Layout = "~/Views/Shared/_LayuiLayout.cshtml";
}

@model CommodityOutput

<form class="layui-form layui-form-pane">
    @Html.AntiForgeryToken()
    <input type="hidden" value="@Model.Id" name="Id" />
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="Name" value="@Model.Name">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">编号</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="Code" value="@Model.Code">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分类Id</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="CategoryId" value="@Model.CategoryId">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品图片地址</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="Pic" value="@Model.Pic">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">数量</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="Number" value="@Model.Number">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">简介</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="Introduce" value="@Model.Introduce">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">积分</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="Integral" value="@Model.Integral">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">金额</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="Money" value="@Model.Money">
        </div>
    </div>
    <div class="layui-form-item" align="center">
        <button type="button" class="layui-btn layui-btn-primary" id="btnCancel">取消</button>
    </div>
</form>

@section scripts{
    <script type="text/javascript">
        var $, layer;
        layui.use(['form'], function () {
            var form = layui.form;
            $ = layui.jquery;
            layer = parent.layer === undefined ? layui.layer : parent.layer;

            // 监听关闭
            $('#btnCancel').on('click', function () {
                layer_close();
            });
        });
    </script>
}

